package com.oa.ll.action;

import java.util.List;

import com.oa.domain.OaRc;
import com.oa.ll.service.GeRenService;
import com.opensymphony.xwork2.ActionSupport;

public class RiChengAction extends ActionSupport{
	private GeRenService gerenservice;
	
	public void setGerenservice(GeRenService gerenservice) {
		this.gerenservice = gerenservice;
	}
	private OaRc rc;
	private List<OaRc> rcs;
	public void setRc(OaRc rc) {
		this.rc = rc;
	}
	public OaRc getRc(){
		return rc;
	}
	
	public String execute() throws Exception {
		rcs=(List<OaRc>) gerenservice.getOaRc(rc);
		return SUCCESS;
	}
    /**
     * 添加日程 
     */
	private String addRiCheng() throws Exception{
	 gerenservice.addOaRc(rc);
	 return SUCCESS;
	}
	
	/**
	 * 修改日程
	 */
	private String updateRiCheng()throws Exception{
	    gerenservice.updateOaRc(rc);
	return "updateRc";
	}
	private String updateRiCheng2() throws Exception{
		gerenservice.updateOaRc2(rc);
		return "updateRc2";
	}
	
	
	/**
	 * 删除日程
	 */
	private String deleteRiCheng()throws Exception{
		gerenservice.deleteOaRc(rc);
		return "deleteRc";
	}
	
}
